function deleteItem(id) {
    const r = confirm("确定要删除这条数据吗？")
    if (r) {
        $.ajax({
            url: `/mysqlmodel/deletedata/`,
            type: 'post',
            data: {
                rid: id,
                type: "del",
            },
            success: (res) => {
                alert(res["messages"]);
                location.reload();
            },
            error: () => alert('删除失败1')
        })
    }

}

function changestats(id){
    $.ajax({
        url: '/mysqlmodel/changestats/',
        type: 'post',
        data: {
            rid: id,
        },
        success:(res) =>{
            alert(res['messages'])
            location.reload()
        },
        error: () => alert('修改状态失败')

    })
}

function checkpro(id){
    $.ajax({
        url: '/mysqlmodel/changestats/',
        type: 'post',
        data: {
            rid: id,
        },
        success:(res) =>{
            alert(res['messages'])
            location.reload()
        },
        error: () => alert('修改状态失败')

    })
}


